From: Carlos Garnacho Date: Wed, 25 Jun 2014 15:53:37 +0000 (+0200) Subject: backgroundMenu: Release the click gesture if a grab operation begun X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~2352 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=1ea2e2bcab50b3ac8648db410eba5d368de7c40b;p=gnome-shell.git backgroundMenu: Release the click gesture if a grab operation begun If an active grab on pointer events happens during multi-touch operations, all non-pointer-emulating touches will be muted. This may leave the Clutter.ClickAction incomplete if triggered by one of those sequences, just to have a gesture take over and trigger a compositor grab, which would leave the capture-event handler stuck eating events. So listen for grab-op-begin from the display, and ensure the action is released if such grab begins. and the capture event handler stuck. --- diff --git a/js/ui/backgroundMenu.js b/js/ui/backgroundMenu.js index b3dec1ce2..d9341f576 100644 --- a/js/ui/backgroundMenu.js +++ b/js/ui/backgroundMenu.js @@ -55,9 +55,14 @@ function addBackgroundMenu(actor, layoutManager) { }); actor.add_action(clickAction); + let grabOpBeginId = global.display.connect('grab-op-begin', function () { + clickAction.release(); + }); + actor.connect('destroy', function() { actor._backgroundMenu.destroy(); actor._backgroundMenu = null; actor._backgroundManager = null; + global.display.disconnect(grabOpBeginId); }); }